﻿#ifndef DADATAMANAGEWIDGET_H
#define DADATAMANAGEWIDGET_H

#include <QWidget>
#include "DAData.h"
class QAction;
class QActionGroup;

namespace Ui
{
class DADataManageWidget;
}
namespace DA
{
/**
 * @brief 数据管理窗口
 */
class DADataManageWidget : public QWidget
{
    Q_OBJECT

public:
    DADataManageWidget(QWidget* parent = nullptr);
    ~DADataManageWidget();

protected:
    void changeEvent(QEvent* e);
    void retranslateUi();
signals:
    /**
     * @brief 变量双击
     * @param data
     */
    void dataDbClicked(const DAData& data);
private slots:
    void onActionTableViewTriggered(bool on);
    void onActionTreeViewTriggered(bool on);
    void onDataMgrTableViewDoubleClicked(const QModelIndex& index);
    void onDataMgrTreeViewDoubleClicked(const QModelIndex& index);

private:
    Ui::DADataManageWidget* ui;
    QAction* _actionTableView;
    QAction* _actionTreeView;
    QActionGroup* _actionGroup;
};
}  // end of namespace DA
#endif  // DADATAMANAGEWIDGET_H
